<template>
	<view class="main">
		<rich-text :nodes="storeClass"></rich-text>
	</view>
</template>

<script>
	import order from '@/api/order'
	import api from '@/api/index.js';
	export default {
		data() {
			return {
				storeClass: {},
				path: api.getPath(),
			}
		},
		onLoad() {
			this.getPlatform()
		},
		methods: {
			getPlatform() {
				order.systemInfoList({
					title: "租赁协议"
				}).then((res) => {
					this.storeClass = this.replaceImgSrc(res.rows[0].content);
				})
			},
			replaceImgSrc(html) {
				return html.replace(/<img src="\/prod-api/g, `<img style="width: 100%; height: 100%;" src="${this.path}`);
			}

		}
	}
</script>

<style lang="less" scoped>
	.main {
		margin: 20rpx;
	}
</style>